<?php

class ProductsController extends AppController {

    var $helpers = array('Html', 'Form');
    var $name = 'Products';

    function view($id = null) {
        $this->layout = 'viewdetail';
        $this->Product->id = $id;
        $this->set('product', $this->Product->read());
    }

    function index() {
        $this->layout = 'listproduct';
        $this->set('product', $this->Product->read());
    }

}

?>
